package com.bpms.atmp.server;

import com.bpms.atmp.client.common.GVO;
import com.bpms.atmp.clienttools.TransferTool;
import com.bpms.common.VO;
import com.bpms.esb.SV;

public class RPCServiceImpl {
	public static final String USERVO = "SESSION_USERVO";
	private static final long serialVersionUID = 1L;

	public GVO g(GVO ht) {
		
		if(ht==null){
			return null;
		}
//		HttpSession session=this.getThreadLocalRequest().getSession();
//		VO userVO=(VO)session.getAttribute(USERVO);
		VO clientVO = TransferTool.I().changeToVO(ht);
		if("ua.login".equalsIgnoreCase(ht.getServiceName())){
//			String remoteIp=this.getThreadLocalRequest().getRemoteAddr();
//			clientVO.setAttr("remoteip", remoteIp);
		}
//		clientVO.merge(userVO);
		VO vo=SV.g(ht.getServiceName(), clientVO);
		if(vo==null){
			GVO g=new GVO();
			g.setAttr("result", "6666");
			g.setAttr("msg", "9000");
			return g;
		}
		GVO gvo=TransferTool.I().changeToGVO(vo);
		return gvo;
	}

}
